﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using Zeus.Thunder.Core;

namespace SharpTrainer.Concurrency
{
    class SimpleTaskTest : ITestCase
    {
        public void Run()
        {
            Console.WriteLine("Waiting for completion");
            Task.Factory.StartNew(Speak).Wait();
            Console.WriteLine("All Done");
        }

        private static void Speak()
        {
            Thread.Sleep(5000);
            Console.WriteLine("Hello World");
        }
    }
}
